Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve panic message #13836

Merged
merged 1 commit into from
Jan 19, 2024
Merged

feat: improve panic message #13836

merged 1 commit into from
Jan 19, 2024

Conversation

ritchie46
Copy link
Member

No description provided.

@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars labels Jan 19, 2024
@ritchie46 ritchie46 merged commit 764822d into main Jan 19, 2024
18 checks passed
@ritchie46 ritchie46 deleted the panic branch January 19, 2024 10:28
@kszlim
Copy link
Contributor

kszlim commented Jan 19, 2024

    ldf = pl.DataFrame({"a": [], "time": []}).lazy()
    timestamp = "time"
    ldf = ldf.with_columns(pl.from_epoch(timestamp, time_unit="ms"))
    ldf = ldf.set_sorted(timestamp)
    quantity = pl.col("a")
    e = quantity.rolling_sum(window_size=timedelta(seconds=1), by=timestamp) - quantity.rolling_sum(window_size=timedelta(seconds=0), by=timestamp)
    ldf.select(e).collect()

Repro case if you want one for the panic that inspired this PR.

@c-peters c-peters added the accepted Ready for implementation label Jan 23, 2024
r-brink pushed a commit to r-brink/polars that referenced this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants